# -*- coding: utf-8 -*-
"""
 * @file bufferpool.py
 * @author SDK_TEAM
 * @brief
 * @version 0.1
 * @date 2022-11-3
 * Copyright:
 * © 2018 北京灵汐科技有限公司 版权所有。
 * 注意：以下内容均为北京灵汐科技有限公司原创，未经本公司允许，不得转载，否则将视为侵权；对于不遵守此声明或者其他违法使用以下内容者，本公司依法保留追究权。
 * © 2018 Lynxi Technologies Co., Ltd. All rights reserved.
 * NOTICE: All information contained here is, and remains the property of Lynxi. This file can not
 * be copied or distributed without the permission of Lynxi Technologies Co., Ltd.
"""


import pylynchipsdk as sdk


class recv_cb_data:
    def __init__(self) -> None:
        self.frame = sdk.lyn_frame_t()
        self.frame_pool = 0
        self.block_queue = 0
        self.send_num = 0
        self.recv_num = 0
        self.attr = ""
        self.video_frame = 0
        self.reconnect = False

class framepool_cb_data:
    def __init__(self, framepool, frame) -> None:
        self.frame_pool = framepool
        self.frame = frame
        self.window_name = ""


class show_cb_data:
    def __init__(self, framepool, frame) -> None:
        self.frame_pool = framepool
        self.frame = frame
        self.video_length = 0
        self.video_height = 0
        self.window_name = ""


class save_file_cb_data:
    def __init__(self) -> None:
        self.packet = sdk.lyn_packet_t()
        self.recv_pool = 0
        self.output_path = ""


class infer_process_attr:
    def __init__(self) -> None:
        self.url = ""
        self.output_path = ""
        self.outnum_min = 1
        self.outnum_max = 10
        self.chan_id = 0
        self.device_id = 0
        self.output_fmt = sdk.lyn_pixel_format_t.LYN_PIX_FMT_NV12
        self.scale = sdk.lyn_scale_t.SCALE_NONE
        self.repeat_num = 5
        self.model_path = ""
        self.plugin_path = ""
        self.width = 0
        self.height = 0
        self.show_type = 0
        self.video_frame = 0


class cb_data:
    def __init__(self) -> None:
        self.frame = sdk.lyn_frame_t()
        self.frame_pool = 0
        self.block_queue = 0
        self.attr: infer_process_attr = 0


class detect_frame:
    def __init__(self) -> None:
        self.host_box_info = None
        self.device_box_info = None
        self.frame = sdk.lyn_frame_t()
        self.reconnect = False